==================================================================================

* REQUIREMENTS / BEFORE YOU BEGIN *

Recompiling Deus Ex: Nihilum's Unreal package files (.U files) requires the following:
	
	- Deus Ex installed (naturally)
	- Deus Ex SDK v1112fm installed
	- Deus Ex: Nihilum installed
	- Deus Ex: Nihilum SDK installed according to the instructions in the file " Installation (Read Me First).txt "
	- Deus Ex Extractor and Decompiler (DEED)* OR the Deus Ex Extractor Tool (CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!)
		* Download links (valid as of May 28th 2013):
		MAIN SITE: 	http://deusexextractor.at.tut.by/download.html
		MIRROR:		https://dl.dropboxusercontent.com/u/15991411/mp3/Bandwidth/MIRROR/deusextools.zip 

( * = Note, it is also possible to use the WOTgreal tool for this purpose, but I haven't used it myself - yet I'm aware that using it would involve a lot more work in certain aspects )	

==================================================================================
==================================================================================
==================================================================================

* BUYER BEWARE / CAVEAT EMPTOR / READ THIS BEFORE CONTINUING *

THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!

!!!!!     I AM NOT RESPONSIBLE FOR WHAT THE DEUS EX EXTRACTOR TOOL MIGHT CAUSE TO YOUR COMPUTER, SO USE IT AT YOUR OWN RISK!     !!!!!

==================================================================================
==================================================================================
==================================================================================

* IN ORDER TO BE ABLE TO RECOMPILE DXN *

With Deus Ex: Nihilum (from now on referred to as DXN) and the DXN SDK installed properly according to the instructions, YOU STILL HAVE TO EXTRACT THE SOUNDS AND CONVERSATION AUDIO FROM DXN ITSELF. They haven't been included with the SDK to maintain a low filesize. All other files (maps, textures, etc.) are supplied in the mod itself.

To extract the remaining audio files, the best tool for the job is the Deus Ex Extractor Tool ( also known as the Deus Ex Extractor and Decompiler (DEED) - CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!!)

----------------------------------------------------------------------------------

* Extraction instructions for the normal sound files *

----------------------------------------------------------------------------------

1) After installing it, open the Deus Ex Extractor from DeusExExtractorGUI.exe OR deedgui.exe.

2) Once you have the Extractor opened, press 'Browse' next to the empty box in the 'Deus Ex Package List' section and select the following directory:

	[Your Deus Ex Directory]\fgrhk\System\ 
	(e.g. C:\DeusEx\fgrhk\System\ OR D:\Steam\steamapps\common\deus ex\fgrhk\System\ etc.)	

	** [Figure1]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure1.JPG **

2) The fgrhk\System directory should now appear in the box.
 
	** [Figure2]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure2.JPG **

3) Now, press 'Browse' next to the Output Directory box. This is where you have to select the directory where the sound files will be extracted.
	CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!

	** [Figure3A]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure3A.JPG **

4) Once you have the directory selected, press 'Update' next to the empty 'Deus Ex Class List' box.

	** [Figure3B]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure3B.JPG **

5) Now, several options should have appeared on the screen - including but possibly not limited to ExtString, LodMesh, Palette, Sound, TextBuffer and Texture.

   Be absolutely sure that 'Sound' is present in this box.

   Deselect every other option so that ONLY 'Sound' HAS BEEN SELECTED.

   Finally, press 'Extract' to extract all the sound files into the output directory you've selected. This might take a while.
	CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!

	** [Figure3C]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure3C.JPG **

6) Now that you have all the sounds extracted into this directory, MOVE ALL THE WAV FILES IN THE OUTPUT DIRECTORY AND ITS SUBDIRECTORIES* INTO:

	[Your Deus Ex Directory]\fgrhk\Sounds
	(e.g. C:\DeusEx\fgrhk\Sounds\ OR D:\Steam\steamapps\common\deus ex\fgrhk\Sounds\ etc.)	

7) In order to be able to recompile DXN's sounds properly, you need to rename a few of them:

		RENAME
		uvb76.wav		INTO		ambibuzzer.wav
		seinbass.wav		INTO		bass_sein.wav
		ForichiOut.wav		INTO		ForichiOutamb.wav
		BUZZER.wav		INTO		thebuzzerinterference.wav
		MaleMunch.wav		INTO		munch.wav
		todoa.wav		INTO		piano_refer1.wav
		jaa2.wav		INTO		piano_refer2.wav

8) When you get to recompiling DXN, you should now have all the sounds in their right places and the compiling process should succeed.

( * = Easiest way is to search the base directory for *.WAV and move all the WAV files into \fgrhk\Sounds )

----------------------------------------------------------------------------------

* Extraction instructions for the conversation audio files *

----------------------------------------------------------------------------------

1) Open the Deus Ex Extractor from DeusExExtractorGUI.exe OR deedgui.exe.

2) Once you have the Extractor opened, press 'Browse' next to the empty box in the 'Deus Ex Package List' section and select the following directory:

	[Your Deus Ex Directory]\fgrhk\System\ 
	(e.g. C:\DeusEx\fgrhk\System\ OR D:\Steam\steamapps\common\deus ex\fgrhk\System\ etc.)	

	** [Figure1]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure1.JPG **

2) The fgrhk\System directory should now appear in the box. 

	** [Figure2]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure2.JPG **

3) Now, select 'Decompiler' from the next section (the row right above the 'Output Directory' box). 

   Press 'Browse' next to the Output Directory box. This is where you have to select the directory where the conversation audio files will be extracted.
	CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!

	** [Figure4A]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure4A.JPG **

4) Once you have the directory selected, press 'Decompile' on the bottom of the screen to finish the process. This might take a while.

	** [Figure4B]  For photographic reference on this part, check [Your Deus Ex Directory]\DXN SDK Documentation\Extraction Instructions\Figure4B.JPG **

5) Go to the output directory you chose. It might have several subdirectories in there but only one of them is important for this process. Go to:

	[Your Output Directory]\fgrhkText.u\ConversationMissionList\
	(e.g. C:\OutputDirectory\fgrhkText.u\ConversationMissionList\ etc.)

	Inside this directory, there should be a subdirectory named 'Audio' that includes all of DXN's conversation audio in MP3 format. 

	MOVE the 'Audio' folder INTO

	[Your Deus Ex Directory]\fgrhk\
	(e.g. C:\DeusEx\fgrhk\ OR D:\Steam\steamapps\common\deus ex\fgrhk\ etc.)	

6) When you get to recompiling DXN, you should now have all the conversation audio in its right place and the compiling process should succeed.

==================================================================================

* RECOMPILING DXN *

!! If you're doing any of this, I expect you to know your way around the Deus Ex SDK - most importantly that you know how to use UCC MAKE. !!

Once you've extracted the sound and conversation audio files properly and moved them into their correct directories, you should now be able to recompile DXN without any problems.

1) Open your DeusEx.ini file ( [Your Deus Ex Directory]\System\DeusEx.ini )

2) Access the DeusEx.ini file and

	2A) add the following lines in the [Core.System] section, RIGHT BELOW  CacheExt=.uxx :

	Paths=..\fgrhk\System\*.u
	Paths=..\fgrhk\Maps\*.dx
	Paths=..\fgrhk\Textures\*.utx
	Paths=..\fgrhk\Sounds\*.uax

	2B) add the following lines at the end of the [Editor.EditorEngine] section, AFTER the part that says  EditPackages=DeusEx :

	EditPackages=CaroneElevatorSet
	EditPackages=DXOgg
	EditPackages=GaussGun
	EditPackages=TacticalUMP
	EditPackages=EnhancedM249
	EditPackages=clyzmsmod
	EditPackages=fgrhk

3) Remove all the existing files named fgrhk.u in your [Your Deus Ex Directory]\fgrhk\System\ AND [Your Deus Ex Directory]\System\ directories.

4) Access [Your Deus Ex Directory]\System\ via the command prompt.

5) Type the following:

	ucc make

	And press Enter.

6) After the program has finished, move the new fgrhk*.u files from [Your Deus Ex Directory]\System into [Your Deus Ex Directory]\fgrhk\System\ 

7) As far as being able to recompile DXN in its "factory version" is concerned, this should be it. No errors should come up after the compiling process is done. Whatever changes you might have made into the original project files might affect this outcome, so keep that in mind and stay sharp! :]

Happy editing!

==================================================================================

* NOTES *

- I'm not a coder and I haven't followed any specific coding conventions with DXN (not that I paid attention to many if any mapping conventions either, mind you). Thus I must apologize beforehand if you find my "coding" confusing! Yet a lot of the code in the mod hasn't been made by me in the first place, so you might be able to find some gems as well!

- As you may have deduced, you could have used the Extraction Tool to extract every file used by the mod (CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!), but in order to be able to recompile DXN with the least hassle, this is more or less the easiest way to do it.

	(Then again, including all sounds in the SDK would have been even easier, but I wanted to keep the SDK's filesize below 5 megabytes)

- Despite the inherent flaw in the Deus Ex Extractor tool (CAVEAT: THE DEUS EX EXTRACTOR TOOL ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!), it is the easiest tool you can use for this process. I'm also sticking to using it on a principle - for instance, with Jedi Knight: Dark Forces II you need to have a tool named Container Manager (ConMan) that can open, edit and create the container files used by the game. With Duke Nukem 3D, you had to use KEXTRACT.exe to extract files from the .GRP files. So in essence, involving an external tool in all this is not exactly that outrageous of an issue. 

	(Funny thing about ConMan, it would NEVER empty the output directory. Go figure.)

- A major warning concerning the Deus Ex Extractor tool: IT ALWAYS EMPTIES THE OUTPUT DIRECTORY YOU'VE SET INTO IT, SO MAKE SURE IT'S AN EMPTY ONE!

==================================================================================
